Skip to content

Make chat diagram creation resilient - #106

Merged
suguanYang merged 1 commit into
stagingfrom
fix/wangbinqi/chat-diagram-resilience
Jun 17, 2026
Merged

Make chat diagram creation resilient#106
suguanYang merged 1 commit into
stagingfrom
fix/wangbinqi/chat-diagram-resilience

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Summary

  • add a per-answer Create diagram action so users can create a chart from the answer they are reading
  • retry schema-mismatched diagram object generation once with a strict repair prompt
  • return a friendly no-diagram state instead of surfacing raw schema validation failures when no valid chart can be produced

Validation

  • pnpm exec vitest run src/components/chat-message-list.test.ts src/app/api/chat/diagram/route.test.ts src/domains/chat/diagram.test.ts src/components/chat-panel.test.ts --reporter=verbose
  • pnpm exec tsc --noEmit --pretty false
  • pnpm exec eslint src/domains/chat/diagram.ts src/domains/chat/diagram.test.ts src/components/chat-panel.tsx src/components/chat-panel.test.ts src/components/chat-message-list.tsx
  • git diff --check
  • pnpm build
  • browser smoke: success and no-diagram paths both returned HTTP 200 and rendered the expected inline states

@vercel

vercel Bot commented Jun 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
knowhere-notebook-staging Ready Ready Preview, Comment Jun 17, 2026 5:37am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
knowhere-notebook Ignored Ignored Jun 17, 2026 5:37am

Request Review

@suguanYang
suguanYang merged commit be8b74c into staging Jun 17, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant